﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace NJL.Web
{
    public partial class CountryExpress : BasePageVisitor
    {
        private readonly BLL.NJL_SYS_NEWS bll = new BLL.NJL_SYS_NEWS();

        protected IList<Model.NJL_SYS_NEWS> LIST_FLASH_20;
        protected IList<Model.NJL_SYS_NEWS> LIST_WYRSS_35;
        protected IList<Model.NJL_SYS_NEWS> LIST_LYKB_36;
        protected IList<Model.NJL_SYS_NEWS> LIST_JDGZ_37;
        protected IList<Model.NJL_SYS_NEWS> LIST_QXQY_38;
        protected IList<Model.NJL_SYS_NEWS> LIST_XCZX_31;
        protected IList<Model.NJL_SYS_NEWS> LIST_YYJH_32;
        protected IList<Model.NJL_SYS_NEWS> LIST_ZTHD_33;
        protected IList<Model.NJL_SYS_NEWS> LIST_RWZF_34;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                txtKeywords.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnSearch.ClientID + "').click();return false;}} else {return true}; ");
            }
            LoadData();
            base.LoadPageSeoInformation("乡村快报");
        }
        private void LoadData()
        {
            LIST_FLASH_20 = bll.GetModelList(6, " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='20' AND IS_PUBLISH=1 ", "SORT DESC,PUBLISH_DATE_TIME DESC");
            LIST_WYRSS_35 = bll.GetModelList(3, " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='35' AND IS_PUBLISH=1 ", "SORT DESC,PUBLISH_DATE_TIME DESC");
            LIST_LYKB_36 = bll.GetModelList(9, " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='36' AND IS_PUBLISH=1 ", "SORT DESC,PUBLISH_DATE_TIME DESC");
            LIST_JDGZ_37 = bll.GetModelList(12, " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='37' AND IS_PUBLISH=1 ", "SORT DESC,PUBLISH_DATE_TIME DESC");
            LIST_QXQY_38 = bll.GetModelList(10, " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='38' AND IS_PUBLISH=1 ", "SORT DESC,PUBLISH_DATE_TIME DESC");
            LIST_XCZX_31 = bll.GetModelList(6, " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='31' AND IS_PUBLISH=1 ", "SORT DESC,PUBLISH_DATE_TIME DESC");
            LIST_YYJH_32 = bll.GetModelList(8, " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='32' AND IS_PUBLISH=1 ", "SORT DESC,PUBLISH_DATE_TIME DESC");
            LIST_ZTHD_33 = bll.GetModelList(4, " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='33' AND IS_PUBLISH=1 ", "SORT DESC,PUBLISH_DATE_TIME DESC");
            LIST_RWZF_34 = bll.GetModelList(4, " NJL_SYS_BASE_ID='" + WEBSITE_CODE + "' AND TYPE_CODE='34' AND IS_PUBLISH=1 ", "SORT DESC,PUBLISH_DATE_TIME DESC");
        }
        protected void btnSearch_Click(object sender, EventArgs e)
        {

            Response.Redirect("~/NewsList.aspx?keywords=" + txtKeywords.Text.Trim());
        }
    }
}